<div id="aliases">
  <% artist.name_aliases.each do |name| %>
    <div class="alias-window">
	  <p>
        <strong><%=h name.name %></strong>
    
        <%= link_to_remote '&nbsp; x', :url => name_alias_url(name), :method => :delete %>
	  </p>
    </div><!-- /alias-window -->
  <% end %>

  <div id="alias-form" style="display: none">

    <% form_remote_for :name_alias, :url => name_aliases_path do |f| %>
      <%= f.hidden_field :id, :value => artist.id %>
      <%= f.text_field :alias_name %>
      <%= f.submit "Add Alias" %>
	  <%= submit_tag 'Cancel', :type => 'button', :onclick => "this.up(1).hide(),this.up(1).next('p').show(),this.form.reset()" %>
    <% end %>
  </div>
  
  <p><%= link_to_function "New Alias", "$('alias-form').show(), this.up().hide()" %></p>
</div>
